package com.sunwayworld.basemodule.business.operationbatch.resource.impl;

import com.sunwayworld.basemodule.business.operationbatch.bean.LimsPreTaskSupplementBean;
import com.sunwayworld.framework.data.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.sunwayworld.basemodule.business.operationbatch.resource.LimsPreTaskSupplementResource;
import com.sunwayworld.basemodule.business.operationbatch.service.LimsPreTaskSupplementService;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;

@LogModule("下发补充信息")
@RestController
@GikamBean
public class LimsPreTaskSupplementResourceImpl implements LimsPreTaskSupplementResource {

    @Autowired
    private LimsPreTaskSupplementService limsPreTaskSupplementService;

    @Override
    public LimsPreTaskSupplementService getService() {
        return limsPreTaskSupplementService;
    }

    @Log(value = "新增下发补充信息", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

    @Override
    public Page<LimsPreTaskSupplementBean> selectPreTaskSupplementToColumns(Long operationBatch, RestJsonWrapperBean wrapper) {
        return getService().selectPreTaskSupplementToColumns(operationBatch, wrapper);
    }

    @Override
    public void updateSupplementByPreFolder(Long preFolderId, RestJsonWrapperBean wrapper) {
        getService().updateSupplementByPreFolder(preFolderId, wrapper);
    }
}
